<script>
    export default{
        name:"Person",
        
        data(){
            return{
                msg:"我来自温州",
                age:20
            }
        },
        methods:{
            add:function(){
                this.age++
                console.log(this.age)
            }
        }

    };


</script>


<template>
  <h1>我是子组件Person!!!!</h1>
  <h2>{{ msg }}+++{{ age }}</h2>
  <button v-on:click="add">点我增加年龄</button>
</template>



<style scoped>

</style>
